package com.shop.cereshop.app.domain.notice;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 系统通知表
 */
@ApiModel(description="系统通知表")
@Data
public class SystemNoticeVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value="主键ID")
    private Long id;

    @ApiModelProperty(value="通知标题，如：系统公告、平台咨询")
    private String title;

    @ApiModelProperty(value="消息类型：1-系统公告 2-平台咨询 3-用户通知")
    private Integer type;

    @ApiModelProperty(value="接收范围：1-全体用户 2-指定用户列表")
    private Integer targetType;

    @ApiModelProperty(value="通知内容")
    private String content;

    @ApiModelProperty(value="图标标识，如：bell, chat, etc.")
    private String icon;

    @ApiModelProperty(value="创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createdAt;

    @ApiModelProperty(value="更新时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updatedAt;

    @ApiModelProperty(value="是否已读：0-否 1-是")
    private Integer isRead;

    @ApiModelProperty(value="接收用户ID（可为空表示全体用户）")
    private Long userId;

    @ApiModelProperty(value="状态：1-正常 2-归档")
    private Integer status;

    @ApiModelProperty(value="优先级：1-低 2-中 3-高")
    private Integer priority;

    @ApiModelProperty(value="跳转链接，如App下载页")
    private String externalLink;

    @ApiModelProperty(value="过期时间，用于自动清理")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime expireAt;


}